import request from '../request.js';

const { mobileUrl } = window.g;

/** 区域概要 */
export const getAreaTips = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve([
        {
          name: '区域云',
          value: 12
        },
        {
          name: '边缘云',
          value: 90
        },
        {
          name: '路测感知系统',
          value: 16
        },
        {
          name: '设备',
          value: 112
        }
      ]);
    }, 2000);
  });
};

/** 路口态势 */
export const getRoadSituational = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve([
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        }
      ]);
    }, 2000);
  });
};

/** 干线态势监控 */
export const getLineSituational = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve([
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        },
        {
          name: '路口1',
          index: 5.3,
          speed: 20,
          waitingTime: 30
        }
      ]);
    }, 2000);
  });
};

/** 获取示范区路口、路段信息 */
export const getAreaInfo = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve();
    }, 2000);
  });
};

/** 交通流量检测 */
export const getTrafficFlow = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve();
    }, 2000);
  });
};

/** 交通事故 */
export const getTrafficAccident = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve();
    }, 2000);
  });
};

/** 异常告警 */
export const getAbnormalAlarm = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve();
    }, 2000);
  });
};

/** 示范区数据地理信息 */
export const getAreaMapInfo = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve();
    }, 2000);
  });
};
